//
//  YAObjGameServer.m
//  YoucApi
//
//  Created by Liam on 11/13/12.
//
//

#import "YAObjGameServer.h"

@implementation YAObjGameServer

@synthesize serverName = _serverName;
@synthesize serverTime = _serverTime;
@synthesize platformName = _platformName;
@synthesize platformUrl = _platformUrl;
@synthesize gameUrl = _gameUrl;

- (id)initWithCoder:(NSCoder *)decoder
{
	self = [super init];
	
	DECODE(serverName, Object);
	DECODE(serverTime, Double);
	DECODE(platformName, Object);
	DECODE(platformUrl, Object);
	DECODE(gameUrl, Object);
	
	return self;
}

- (void)encodeWithCoder:(NSCoder *)encoder
{
	ENCODE(serverName, Object);
	ENCODE(serverTime, Double);
	ENCODE(platformName, Object);
	ENCODE(platformUrl, Object);
	ENCODE(gameUrl, Object);
}

- (void)dealloc
{
    SAFE_RELEASE(_serverName);
    SAFE_RELEASE(_platformName);
    SAFE_RELEASE(_platformUrl);
	SAFE_RELEASE(_gameUrl);
    
    [super dealloc];
}

@end
